package com.ordertracker.protocol;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;

@XmlRootElement
public class MessageResponse implements Serializable {
    private static final long serialVersionUID = -8640130556130478027L;

    private String obj;
    private String type;

    public MessageResponse() {
    }

    public MessageResponse(String obj, Class type) {
        this.obj = obj;
        this.type = type.getName();
    }

    @XmlElement(nillable = false)
    public String getObj() {
        return obj;
    }

    public void setObj(String obj) {
        this.obj = obj;
    }

    @XmlElement(nillable = false)
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
